<template>
        <van-popup v-model="show" class="picker" position="bottom">
            <van-picker
            :columns="columns"
            @cancel="onCancel"
            @confirm="onConfirm"
            cancel-button-text='删除'
             show-toolbar />
        </van-popup>
</template>
<script>
import { Picker,Popup } from 'vant';
export default {
    name:'picker',
    props:{
        columns:{
            default:function(){
               return []
            }
        },
    },
    data() {
        return {
            show:false
        }
    },
    methods: {
    onConfirm(value, index) {
        this.show=false
        this.$emit('confirm',value,index)
    },
    onCancel(value, index) {
        this.show=false
        this.$emit('cancel',value, index)
    }
  }
}
</script>
<style >
    /* .picker{
        width:100%;
    } */
</style>

